import { FORMTYPEDATA } from "../../../type";

export interface SelectComponentProps {
  modelValue?: number | string | Array<number | string>;
  multiple?: boolean;
  multipleLimit?: number;
  clearable?: boolean;
  placeholder?: string;
  collapseTags?: boolean;
  maxCollapseTags?: number;
  collapseTagsTooltip?: number;
  allowCreate?: boolean;
  filterable?: boolean;
}
export interface SelectComponentData {
  options: {
    label: string | number;
    value: string | number;
  }[];
}

export const SelectItemAttr: FORMTYPEDATA<
  SelectComponentProps,
  SelectComponentData
> = {
  componentData: {
    options: [
      {
        label: "选项一",
        value: "1",
      },
      {
        label: "选项二",
        value: "2",
      },
    ],
  },
  componentProps: {
    modelValue: "",
    clearable: true,
    placeholder: "请选择",
    multiple: false,
    multipleLimit: 0,
    allowCreate: false,
    collapseTags: false,
    maxCollapseTags: 1,
    collapseTagsTooltip: 1,
    filterable: false,
  },
  componentStyle: {
    width: 200,
  },
  elFormItemProps: {},
  // 是否隐藏
  hidden: false,
  // 组件显隐规则
  hiddenRules: [],
};
